package com.itheima.store.service.impl;

import com.itheima.store.dao.UserDao;
import com.itheima.store.entity.User;
import com.itheima.store.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public boolean register(User user) {
        if(userDao.register(user)>0){
            return true;
        }
        return false;
    }

    @Override
    public User login(User user) {

        return userDao.login(user);
    }
}
